home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Ham⁄GPS / IP Folder / HAMradio TCP⁄IP / Docs / MacIP Specs 2 < prev    next >
Text File  |  1993-01-03  |  10KB  |  254 lines

  1. AA Protocol Specification                    8/21/90
  2.  
  3.  
  4.                Josh Littlefield
  5.                 Cayman Systems
  6.                 rev 1.0
  7.  
  8.               AA Protocol Specification
  9.  
  10. 1. Introduction
  11.  
  12. This document describes the AA protocol, which is used between the
  13. atalkad daemon and certain AppleTalk/Ethernet routers, and between the
  14. routers themselved.  The protocol is based on UDP.  This description
  15. is derived from the C source code of the KIP software distribution
  16. from Stanford University.
  17.  
  18. 2. Configuration
  19.  
  20. Each router is pre-configured with the IP address of the
  21. administration host (the host running atalkad).  On boot-up, the
  22. router makes configuration (aaCONF) requests to the administration
  23. hosts until a response is received.  The KIP code makes these requests
  24. at 5 second intervals.  K-Star makes requests at intervals
  25. increasing by 5 seconds each time, with a maximum interval of
  26. 2 minutes between requests.  The GatorBox does the same.
  27. Configuration information consists of AppleTalk network numbers for
  28. the router's LocalTalk, EtherTalk and KIP (UDP encapsulated AppleTalk)
  29. interfaces.  It also specifies the IP broadcast address, the base UDP
  30. port numbers, the number of static and dynamic IP addresses the router
  31. may assign to AppleTalk nodes, and flags indicating restrictions to
  32. apply to NBP lookup replies passing through the router.
  33.  
  34. 3. Initial Routes
  35.  
  36. Having received its configuration, the router now requests its initial
  37. routing information (aaROUTEI) from the administration host.  This
  38. request is repeated at 1 minute intervals until a response is
  39. received.  This initial route information comes in the form of routing
  40. tuples with the following data:
  41.  
  42.     AppleTalk net #
  43.     IP address (typically of bridge node), or IP net.
  44.     distance
  45.     type
  46.  
  47. The type field may indicate one of the following flags:
  48.  
  49.     K    - A route to LocalTalk net via IP address.  Typically
  50.         a K-Box or GatorBox.
  51.  
  52.     N    - A mapping between IP net and AppleTalk net, where IP
  53.         net supports directed broadcast.
  54.  
  55.     H    - A mapping between IP net and AppleTalk net, where IP
  56.         net does broadcasts are performed by re-broadcast
  57.         service at IP address.
  58.  
  59. Additionally, the K flag may be accompanied by the C flag, which
  60. indicates the router at IP address is a core router.  And the N flag
  61. is accompanied by a value indicating how to many bytes of 0xFF should
  62. be or'd into IP net to form the broadcast address.
  63.  
  64. These routes are added into the route table, with their flags.  An
  65. additional flag is added to them to indicate that they came from an
  66. aaROUTEI packet.  We'll refer to these as AA routes.
  67.  
  68. On receiving an aaROUTEI packet, the router purges all previous AA
  69. routes, adds the new routes, and responds with an aaROUTEQ request.
  70. (Although the current atalkad ignores aaROUTEQ packets.)
  71.  
  72. 4. Propagation of Routes
  73.  
  74. Once the initial routing (aaROUTEI) packet has been received, locally
  75. discovered routes may be propagated with the help of core routers.
  76. Once a minute each router sends an aaROUTEQ packet to one core router.
  77. Each core router is used in turn.  The aaROUTEQ packet should contain
  78. all non-IP routes in the table -- that is, routes which are not via an
  79. IP host.  The format of the tuples in the aaROUTEQ packet is identical
  80. to that of the aaROUTEI tuples.
  81.  
  82. There is nothing special about a core router, except that it will be
  83. sent aaROUTEQ packets.  All routers speaking the AA protocol should be
  84. capable of acting as a core router.
  85.  
  86. On receiving an aaROUTEQ packet, the router assimilates the new routes
  87. and responds with an aaROUTE packet.  This packet contains all non-AA
  88. routes, in the same tuples format as the aaROUTEI and aaROUTEQ
  89. packets.
  90.  
  91. In this way, the non-core routers tell each of the core routers what
  92. they know, and learn from them what the other non-core routers know.
  93. Eventually, all the routers know about all the nets.  The number of
  94. core routers determines how long it will take to propagate the routing
  95. information -- the fewer, the faster.
  96.  
  97. Unlike RTMP, in which a router offers other its routing services to a
  98. particular net, aaROUTE and aaROUTEQ packets inform routers about
  99. routing services provided by others.  Because of this, the distance
  100. field of tuples should be maintained differently.  The KIP and K-Star
  101. implementations tend to increment the distance unnecessarily, in that
  102. a non-core router will end up with routes of distance 3 which are
  103. really only 2 hops away.  The GatorBox does the same for
  104. compatibility.
  105.  
  106. 5. Maintenance of Routes
  107.  
  108. Routes acquired through aaROUTEI packets are never aged.  They are
  109. purged when a new ROUTEI packet is received.  Routes acquired through
  110. aaROUTEQ and aaROUTE packets are aged and expired like routes acquired
  111. through RTMP, except that they must be aged more slowly.  The RTMP
  112. aging algorithm indicates that new routes are "Good" until the next
  113. pass of the Validity timer (a period of not more than 20 seconds).
  114. The routes are then "Suspect" for another Validity timer period (20
  115. seconds), and then "Bad" for another timer period.  "Bad" routes are
  116. expired after another 2 Validity periods (per AppleTalk 2.0).
  117.  
  118. The example set by the KIP code is to extend the "Suspect" time of a
  119. route from 1 to 15 Validity timer periods.  This provides a 5 minute
  120. window for the route to be refreshed, which should be adequate if the
  121. number of core routers is relatively small.
  122.  
  123. 6. Zone Information
  124.  
  125. The AA protocol provides 2 mechanisms for adding zone information to
  126. routes, aaZONE and aaZONEQ.  The aaZONE packet is a request to atalkad
  127. for all zone information corresponding to the initial routes.  The
  128. response packet (also aaZONE) contains tuples of the form:
  129.  
  130.     net#   net#   ...  0   zonename
  131.     net#   net#   ...  0   zonename
  132.     ...
  133.     0xFFFF
  134.  
  135. The aaZONEQ packet is really a normal ZIP packet wrapped in an AA
  136. protocol packet, providing for ZIP_Query and ZIP_Reply.
  137.  
  138. A router should send an aaZONE or aaZONEQ packet to atalkad to learn
  139. the zone names of any AA route nets.  For other IP-based routes
  140. (learned about through aaROUTEQ and aaROUTE packets), the router
  141. should send an aaZONEQ packet to the bridge router.
  142.  
  143. 7. Restart
  144.  
  145. The AA protocol provides a procedure for restarting routers.  When a
  146. router receives an aaRESTART packet, it should restart at least its
  147. AppleTalk router subsystem.
  148.  
  149. 8. Security
  150.  
  151. All AA protocol packets provide a "magic number" to double check
  152. packet validity.  Furthermore, routers are encouraged to check the
  153. acceptability of the IP host sending the packet.  Typically packets
  154. should be taken from the administration host, the debug host (whose
  155. address is specified in the aaCONF packet), and any IP host which
  156. appeared with a K flag in an aaROUTEI packet.
  157.  
  158. 9. Packet Formats
  159.  
  160. AA protocol packets start with a common header:
  161.  
  162.                 +-------------------------------------+
  163.                 |            magic number          |
  164.                 +-------+---------+-------------------+
  165.                 | type  |  flags  | data size (bytes) |
  166.                 +-------+---------+-------------------+
  167.         |        sender's IP address          |
  168.                 +-------------------------------------+
  169.         |            data              |
  170.         |         (up to 512 bytes)          |
  171.                 +-------------------------------------+
  172.  
  173. Where:
  174.         Magic number:        0xFF068030
  175.         Flags:            0
  176.         Type:
  177.             aaCONF        1
  178.             aaROUTEI    2
  179.             aaROUTE        3
  180.             aaROUTEQ    4
  181.             aaRESTART    5
  182.             aaZONE        6
  183.             aaZONEQ        7
  184.  
  185. The data portion of the aaCONF packet has the following structure:
  186.  
  187.  
  188.       +--------------------------------------------------------+
  189.       |          IP broadcast address               |
  190.       +--------------------------------------------------------+
  191.       |         IP name server address               |
  192.       +--------------------------------------------------------+
  193.       |         IP debug host address               |
  194.       +--------------------------------------------------------+
  195.       |         IP file server address               |
  196.       +--------------------------------------------------------+
  197.       |        Other IP address (4 long words)           |
  198.       +--------------------------------------------------------+
  199.       |                                   |
  200.       +--------------------------------------------------------+
  201.       |                                   |
  202.       +--------------------------------------------------------+
  203.       |                                   |
  204.       +----------------------------+---------------------------+
  205.       |       EtherTalk net #      |    Base UDP WKS port      |
  206.       +----------------------------+---------------------------+
  207.       |             flags                   |
  208.       +----------------------------+---------------------------+
  209.       | # of static IP addresses   |    # of dyn. IP addresses |
  210.       +----------------------------+---------------------------+
  211.       |       LocalTalk net #      |        KIP net #          |
  212.       +--------------------------------------------------------+
  213.  
  214.  
  215. Where:
  216.         Flags:
  217.             STAY_IN_ZONE    1
  218.             LASER_FILTER    2
  219.             TILDE_FILTER    4
  220.  
  221. The data portion of the aaROUTE, aaROUTEI and aaROUTEQ packets is a
  222. series of tuples of the following structure:
  223.  
  224.       +--------------------------------------------------------+
  225.       |         IP net or node address                 |
  226.       +----------------------------+---------------+-----------+
  227.       |       AppleTalk net #      |      flags    |   hops    |
  228.       +----------------------------+---------------+-----------+
  229.  
  230.  
  231. Where:
  232.     Flags:
  233.         Core Router        0x10
  234.         Rebroadcast Host    0x20
  235.         Network            0x40
  236.             Network type    0x01, 0x02, 0x03, 0x04
  237.             (used only with Network flag)
  238.         K Box            0x80
  239.             Etalk            0x01
  240.             (used only with K Box flag)
  241.         Received from AA    0x08
  242.  
  243. 10. Other Numbers
  244.  
  245.     AA protocol UDP port:        901
  246.     AA rebroadcast UDP port:    902
  247.     Debugging protocol UDP port:    900
  248.     Old UDP WKS base UDP port:    768
  249.     New UDP WKS base UDP port:    200
  250.     Non-WKS base UDP port:        16384
  251.  
  252.  
  253.  
  254.